function FindProxyForURL(url, host) {
    return FindProxyForURLByShell(url, host);
}

function FindProxyForURLByShell(url, host) {
    var patterns = new Array(
    	"*git-scm.com/*",
    	"*t.co/*",
        "*hulu.com/*",
        "*facebook.com/*",
      	"*fbcdn.net/*",
        "*twitter.com/*",
	"*twimg.com/*",
	"*blogspot.com/*",
	"*blogger.com/*",
	"*gstatic.com/*",
      	"*google.com/*",
	"*google.com.hk/*",
	"*googleapis.com/*",
	"*googlecode.com/*",
	"*googlevideo.com/*",
	"*googlesource.com/*",
	"*googleusercontent.com/*",
      	"*youtube.com/*",
	"*ytimg.com/*",
	"*feedsportal.com/*",
	"*forum.xda-developers.com/*",
	"*wordpress.com/*",
	"*feeds.feedburner.com/*",
	"*crackle.com/*",
	"*bloomberg.com/*",
	"*nytimes.com/*",
	"*sourceforge.net/*",
	"*sf.net/*",
	"*appspot.com/*",
	"*goo.gl/*",
	"*android.com/*",
	"*cbsnews.com/video/*",
	"*wikimedia.org/*",
	"*feedly.com/*",
	"*wsj.com/*",
	"*wsj.net/*",
	"*bit.ly/*",
	"*bbc.co.uk/*",
	"*digg.com/reader*",
	"*instagram.com/*",
	"*fb.me/*",
	"*cdn.sstatic.net/*",
	"*github.global.ssl.fastly.net/*",
	"*cbsnews.com/*",
	"*cbsi.com/*",
	"*ggpht.com/*",
	"*xda-developers.com/*",
	"*economist.com/*"
        );

    for (var i = 0; i < patterns.length; i++) {
        if (shExpMatch(url, patterns[i])) {
	    return "SOCKS localhost:1080; SOCKS5 localhost:1080; DIRECT";
        }
    }
    return "DIRECT";
}
